/*
	DIMGA
	Distributed Island Model Genetic Algorithm 

	Copyright (c) 2006 Nikola Sivacki nsivacki@gmail.com

	This program is free software; you can redistribute it and/or
	modify in under the terms of the GNU General Public Licence as
	published by the Free Software Foundation; either version 2 of
	the Licence, or [at your option] any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAT PURPOSE. See the
	GNU General Public Licence for more details.

	You should have received a copy of the GNU General Public Licence
	along with this program; if not, write to the Free Software 
	Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// Genotype.h
#ifndef GENOTYPE_H
#define GENOTYPE_H

#include "evaluator.h"

class Genotype
{
public:
	Genotype() {}
	Genotype(long _lSize);
	~Genotype();

	float 	        GetFitness(Evaluator* _ev) { return _ev->Evaluate(m_data, m_lSize); }
	unsigned char* 	GetBytes() 	{ return m_data; }
	long 	        GetSize()	{ return m_lSize;}

	void setGenome(unsigned char* source);

	void toFile(const char* file);

private:
	long m_lSize;
	unsigned char* m_data;
};

#endif //GENOTYPE_H
